<extend name="Public/layout"/>
<block name="style" >
    <link rel="stylesheet" type="text/css" href="__LYUI__/css/lyui.extend.min.css">
    <link rel="stylesheet" type="text/css" href="__ADMIN_CSS__/style.css">
</block>

<block name="main">
   <div id="main" class="col-xs-12 col-sm-9 main" style="overflow-y: scroll;">
        <!-- 面包屑导航 -->
        <ul class="breadcrumb">
            <li><i class="fa fa-map-marker"></i></li>
            <foreach name="_menu_tab['name']" item="tab_v" >
            <li class="text-muted">{$tab_v}</li>
            </foreach>
        </ul>

        <!-- 主体内容区域 -->
        <div class="tab-content ct-tab-content">
            <div class="panel-body">
                <div class="builder formbuilder-box">
                    <div class="builder-tabs builder-form-tabs">
                        <?php $type=I('type'); ?>
                        <ul class="nav nav-tabs">
                            <li <neq name="type" value="over" >class="active"</neq> >
                                <a href="{:U('Complaint/index')}">待处理</a>
                            </li>
                            <li <eq name="type" value="over" >class="active"</eq> >
                                <a href="{:U('Complaint/index',array('type'=>'over'))}">已处理</a>
                            </li>
                        </ul>
                    </div>
                    <div class="form-group"></div>
                    <div class="builder-container" >
                        <div class="form-group"></div>

                        <!-- 顶部工具栏按钮 -->
                        <div class="builder-toolbar">
                            <div class="row">
                                <!-- 工具栏按钮 -->
                                    <div class="col-xs-12 col-sm-8 button-list clearfix">
                                    </div>
                            </div>
                        </div>
                        
                        <!-- 数据列表 -->
                        <div class="builder-container">
                            <div class="row">
                                <div class="col-xs-12">
                                    <div class="builder-table">
                                        <div class="panel panel-default table-responsive">
                                            <table class="table table-bordered table-striped table-hover">
                                              <thead>
                                                <tr>
                                                    <th>ID</th>
                                                    <th>投诉人</th>
                                                    <th>电话</th>
                                                    <th>时间</th>
                                                    <th>状态</th>
                                                    <th>操作</th>
                                                </tr>
                                            </thead>
                                                <tbody>
                                                    <?php 
                                                        $status_name[0]='未读';
                                                        $status_name[1]='已读';
                                                     ?>

                                                    <volist name="list" id="data">
                                                        <tr>
                                                            <td>{$data['id']}</td>
                                                            <td>{$data['username']}</td>
                                                            <td>{$data['mobile']}</td>
                                                            <td>{$data['create_time']|date='Y-m-d H:i:s',###}</td>
                                                            <td>
                                                              {$status_name[$data['status']]}
                                                            </td>
                                                            <td>
                                                                <a name="edit" title="查看详情" class="label label-primary-outline label-pill" href="{:U('edit',array('id'=>$data['id']))}">详情</a>

                                                                <a name="delete" title="删除" class="label label-danger-outline label-pill ajax-get confirm"  href="{:U('delete',array('id'=>$data['id']))}">删除</a>
                                                            </td>
                                                        </tr>
                                                    </volist>

                                                    <empty name="list">
                                                        <tr class="builder-data-empty">
                                                            
                                                            <td class="text-center empty-info" colspan="20">
                                                                <i class="fa fa-database"></i> 暂时没有数据<br>
                                                            </td>
                                                        </tr>
                                                    </empty>
                                                </tbody>
                                            </table>
                                        </div>

                                        <notempty name="table_data_page">
                                            <ul class="pagination">{$table_data_page}</ul>
                                        </notempty>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
            </div>
        </div>
    </div>                   
</div>
</block>

<block name="script">
    <script type="text/javascript" src="__LYUI__/js/lyui.extend.min.js"></script>
</block>